import React, { PureComponent } from 'react';
import { Card } from 'antd';
import moment from 'moment';
import DescriptionList from '@/components/DescriptionList';
import TextOverFlow from '../../components/TextOverFlow';

const { Description } = DescriptionList;
class EmpInfor extends PureComponent {
  render() {
    const { sendInfoDetDto, persion } = this.props;
    return (
      <div>
        <Card
          title={
            <span style={{ fontWeight: 'bolder' }} id="sendInfor">
              派单信息
            </span>
          }
          bordered={false}
        >
          <DescriptionList>
            <Description term="签约方">
              <div>
                <TextOverFlow text={sendInfoDetDto.ordSndrName} lineClampNum={1} />
              </div>
            </Description>
            <Description term="客户名称">{persion.custName}</Description>
            <Description term="执行地">{persion.declAreaName}</Description>
            <Description term="派单时间">
              {sendInfoDetDto.ordCreTime
                ? moment(sendInfoDetDto.ordCreTime).format('YYYY-MM-DD HH:mm')
                : '--'}
            </Description>
            <Description term="所属客服">{sendInfoDetDto.custSerRespName}</Description>
            {/* <Description term="操作时间">
              {sendInfoDetDto.operTime
                ? moment(sendInfoDetDto.operTime).format('YYYY-MM-DD HH:mm')
                : '--'}
            </Description> */}
          </DescriptionList>
        </Card>
        <Card
          title={
            <span style={{ fontWeight: 'bolder' }} id="basicma">
              基本信息
            </span>
          }
          bordered={false}
        >
          <DescriptionList>
            <Description term="姓名">{sendInfoDetDto.empName}</Description>
            <Description term="证件类型">{sendInfoDetDto.idTypeName}</Description>
            <Description term="证件号">{sendInfoDetDto.idCode}</Description>
            <Description term="性别">{sendInfoDetDto.genderName}</Description>
            <Description term="国籍">
              {sendInfoDetDto.nationName ? sendInfoDetDto.nationName : '--'}
            </Description>
            <Description term="出生日期">
              {sendInfoDetDto.birthDate
                ? moment(sendInfoDetDto.birthDate).format('YYYY-MM-DD')
                : '--'}
            </Description>

            <Description term="电话">{sendInfoDetDto.mobile}</Description>
            <Description term="员工邮箱">
              {sendInfoDetDto.email ? sendInfoDetDto.email : '--'}
            </Description>
          </DescriptionList>
        </Card>
      </div>
    );
  }
}

export default EmpInfor;
